import { h } from 'vue';
import { FormSchema } from '/@/components/Table';
import { Tinymce } from '/@/components/Tinymce';
export const userAgreementData: any = [
  {
    id: 1,
    content: '富文本内容',
    name: '美窝房产用户协议',
  },
];

export const userAgreementFormSchema: FormSchema[] = [
  {
    label: 'id',
    field: 'id',
    component: 'Input',
    show: false,
  },
  {
    field: 'name',
    label: '名称：',
    component: 'Input',
    colProps: { span: 22 },
  },
  {
    field: 'content',
    component: 'Input',
    label: '文章内容',
    defaultValue: 'defaultValue',
    rules: [{ required: true }],
    render: ({ model, field }) => {
      return h(Tinymce, {
        value: model[field],
        onChange: (value: string) => {
          model[field] = value;
        },
      });
    },
  },
];
